import math 
def factorial(n):
    if n==0:
        return 1
    else:
        return factorial(n-1)*n
n=int(input('请输入n的值：'))
print('{}的阶乘为{}'.format(n,factorial(n)))
